Skip to content

Conversation

@erka
Copy link
Contributor

@erka erka commented Oct 31, 2025

This PR

Add experimental WithFromEnv() option to configure the OFREP provider using
environment variables, along with several enhancements and improvements.

  • Add WithFromEnv() configuration option supporting:
    • OFREP_ENDPOINT: base URI for the OFREP service
    • OFREP_TIMEOUT: timeout duration (e.g., "30s", "500ms")
    • OFREP_API_KEY: API key for X-API-Key authentication
    • OFREP_BEARER_TOKEN: token for Bearer authentication
    • OFREP_HEADERS: comma-separated custom headers
  • Add WithHeader() option for setting custom headers
  • Add WithBaseURI() option to override base URI
  • Add WithTimeout() option to configure HTTP client timeout
  • Set Content-Type header to "application/json" in HTTP requests
  • Update error handling to include underlying error causes
  • Add Go SDK interface assertion (var _ openfeature.FeatureProvider)

Related Issues

blocked by open-feature/go-sdk#439
related open-feature/go-sdk#437, open-feature/protocol#53

Add experimental WithFromEnv() option to configure the OFREP provider using
environment variables, along with several enhancements and improvements.

New features:
- Add WithFromEnv() configuration option supporting:
  - OFREP_ENDPOINT: base URI for the OFREP service
  - OFREP_TIMEOUT: timeout duration (e.g., "30s", "500ms")
  - OFREP_API_KEY: API key for X-API-Key authentication
  - OFREP_BEARER_TOKEN: token for Bearer authentication
  - OFREP_HEADERS: comma-separated custom headers
- Add WithHeader() option for setting custom headers
- Add WithBaseURI() option to override base URI
- Add WithTimeout() option to configure HTTP client timeout
- Set Content-Type header to "application/json" in HTTP requests
- Update error handling to include underlying error causes
- Add Go SDK interface assertion (var _ openfeature.FeatureProvider)

Signed-off-by: Roman Dmytrenko <[email protected]>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants